import honglieUart as hlu
import ctypes
e_f32=hlu.Element(ctypes.c_float,-3.14)
e_u16=hlu.Element(ctypes.c_uint16,40000)
e_u32=hlu.Element(ctypes.c_uint32,70000)
e_i16=hlu.Element(ctypes.c_int16,-45)
e_i32=hlu.Element(ctypes.c_int32,-70000)

buffer=hlu.get_buffer(e_f32)
for b in buffer:
    print(hex(b),end=" ")
buffer[4]=0x40
print("\n")
elements=hlu.get_elements(buffer)
print(elements)